<?php

class adminmenu extends CActiveRecord
{
	public static function model($className = __CLASS__ )
	{
		return parent::model($className);
	}
	
	public function relations()
	{
		return array(
			"sub_adminmenu" => array(self::HAS_MANY, "adminmenu", "parent_id")
		);	
	}
	
	public function scopes()
	{
		return array(
			"parent" => array("condition" => "parent_id = 0", "order"=>"`order`")
		);
	}
}
